package com.zxjbyte.yiyi.framework.operatelog.event;

import com.google.common.eventbus.Subscribe;
import com.zxjbyte.yiyi.framework.common.core.eventbus.EventSubscriber;
import com.zxjbyte.yiyi.module.system.api.log.OperateLogApi;
import lombok.RequiredArgsConstructor;

/**
 *
 * @Author zhangxingjia
 * @Date 2023/3/17 15:00
 * @Version: 1.0
 */
@RequiredArgsConstructor
@EventSubscriber(async = true)
public class OperateLogListener {

    private final OperateLogApi operateLogApi;

    @Subscribe
    public void addOperateLog(OperateLogAddEvent event) {
        operateLogApi.addOperateLog(event.getAddDto());
    }
}
